package com.mrzhou.common.feign.client;

import com.mrzhou.common.constant.CommonConstant;
import com.mrzhou.common.feign.factory.SystemClientFallbackFactory;
import com.mrzhou.common.feign.fallback.SystemClientFallback;
import com.mrzhou.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(
        value = CommonConstant.APPLICATION_CLOUD_SYSTEM,
        fallbackFactory = SystemClientFallbackFactory.class
)
public interface ISystemClient {

    String ROLE_ALIASES= CommonConstant.API_PREFIX + "/role-aliases";
    String ROLE_PERMS = CommonConstant.API_PREFIX + "/role-perms";

    @PostMapping(ROLE_ALIASES)
    R<List<String>> getRoleAlias(@RequestParam("roleIds") String roleIds);

    @PostMapping(ROLE_PERMS)
    R<List<String>> getRolePerms(@RequestParam("roleIds") String roleIds);

    @PostMapping("boolean")
    Boolean tempBoolean();

}
